<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>中心查询-启昆国际儿童教育中心</title>
    <link rel="stylesheet" href="/css/common.css" />
  <script type="text/javascript" src="/js/jquery-1.11.0.js"></script>
  <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=fbXf9j0aPH4EwxPBaixZ8Ll2rGwMbFe8"></script>
</head>

<body>

  <div class="headerx">
    <div class="index-header">
      <div class="logo">
        <a href="/">
          <img src="/images/logo.png" alt="启昆国际儿童教育中心" />
        </a>
      </div>
      <div class="nav">
        <ul>
          <li><a href="/">首页</a></li>
          <li><a href="/brand.html">关于启昆</a></li>
          <li><a href="/mengshi.html">启昆课程</a></li>
          <li><a href="/tea/">优秀导师</a></li>
          <li class="active"><a href="/query.html">中心查询</a></li>
          <li><a href="/news/">启昆动态</a></li>
          <li><a href="/contact.html">联系我们</a></li>
          <li><a href="/join.html" class="last">加盟我们</a></li>
        </ul>
      </div>
      <div class="kefu">
        <div class="kefu1">客户咨询热线</div>
        <div class="kefu2">4006707899</div>
      </div>
    </div>
  </div>
  <div class="slider">
    <img src="/images/banner_query.png" />
  </div>
  <div class="box-wrapper">
    <div class="box">
      <div class="box-map">
        <div class="box-title">全国中心分布图</div>
        <div class="box-search" style="display: none;">
          <select class="select" id="p">
            <option value="浙江省">浙江省</option>
          </select>
          <select class="select" name="" id="c">
            <option value="杭州">杭州</option>
          </select>
          <select class="select" id="d">
                 <option value="滨江">滨江</option>
               </select>
          <button class="btn">点击查询</button>
        </div>
        <div class="map-wrap">
          <img src="/images/query_map.png" class="map-bg" />
          <div class="sh-marker">
            <div class="marker">
              <img src="/images/query_marker.png" />
              <span class="city-name">上海</span>
            </div>
            <div class="marker-dialog" style="display:none;">
              <div class="marker-p">上海</div>
              <a href="javascript:;" class="close">
                <img src="/images/query_close.png" alt="">
              </a>
              <div class="marker-c">
                <span class="city" data-code="sh">上海</span>
              </div>
            </div>
          </div>

          <div class="zj-marker">
            <div class="marker">
              <img src="/images/query_marker.png" />
              <span class="city-name">浙江</span>
            </div>
            <div class="marker-dialog" style="display:none;">
              <div class="marker-p">浙江</div>
              <a href="javascript:;" class="close">
                <img src="/images/query_close.png" alt="">
              </a>
              <div class="marker-c">
                <span class="city" data-code="hz">杭州</span>
                <span class="city" data-code="sx">绍兴</span>
                <span class="city" data-code="nb">宁波</span>
                <span class="city" data-code="wz">温州</span>
                <span class="city" data-code="jh">金华</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="map-box" style="display: none;">
        <div class="map-title">
          <span id="back" style="font-size: 40px;">返回</span>
          <span id="mapCity" style="font-size: 40px;"></span>
        </div>
        <div class="map-wrap">
          <div id="map" style="width: 1030px; height: 757px"></div>
        </div>
      </div>
    </div>
  </div>
   <stl:include file="/include/form.html"></stl:include>
  <stl:include file="/include/footer.html"></stl:include>
  <script>
    var opts = {
      width: 300,
      height: 100
    }

    var o = {
      sh: [{
        lng: 121.460036,
        lat: 31.241699,
        title: '<div> 上海静安校区</div>',
        content: '<div>电话： 021-62600208</div><div>地址：上海市静安区江宁路静安体育中心1楼 </div>'
      }],
      hz: [{
        lng: 120.200336,
        lat: 30.209568,
        title: '<div>杭州水印城校区</div>',
        content: '<div>电话：0571-87791335</div><div>地址：滨江区水印巷56号水印城8幢水印城会所</div>'
      }, {
        lng: 120.163593,
        lat: 30.298074,
        title: '<div>杭州昆仑公馆校区</div>',
        content: '<div>电话：13346175819</div><div>地址：拱墅区长板巷99号昆仑公馆6幢1楼</div>'
      }, {
        lng: 120.131146,
        lat: 30.352139,
        title: '<div>杭州北宸之光校区</div>',
        content: '<div>电话：0571-87787332</div><div>地址：余杭区通运街215-28号</div>'
      }, {
        lng: 120.119334,
        lat: 30.287316,
        title: '<div>杭州嘉绿名苑校区</div>',
        content: '<div>电话：0571-88055926</div><div>地址：西湖区益乐路45号嘉绿名苑西区15幢1楼 </div>'
      }, {
        lng: 120.174944,
        lat: 30.320986,
        title: '<div>杭州中粮方圆府校区</div>',
        content: '<div>电话：0571-87569805</div><div>地址：下城区西文街149号粮方圆府1号楼3楼</div>'
      }, {
        lng: 120.269661,
        lat: 30.326871,
        title: '<div>杭州九堡校区</div>',
        content: '<div>电话：0571-86960137</div><div>地址：江干区九堡九华路63号财通大厦1F</div>'
      }, {
        lng: 120.290887,
        lat: 30.308643,
        title: '<div>杭州红苹果校区</div>',
        content: '<div>电话：0571-86907607</div><div>地址：杭州市江干区仁爱路22-2、22-3号</div>'
      }, {
        lng: 120.156819,
        lat: 30.274716,
        title: '<div>杭州武林校区</div>',
        content: '<div>电话：0571-87387286</div><div>地址：杭州市西湖区体育场路580号</div>'
      }, {
        lng: 120.241768,
        lat: 30.358064,
        title: '<div>杭州昆仑天籁校区</div>',
        content: '<div>电话：0571-85132272</div><div>地址：江干区丁桥丁群街212、214号昆仑天籁</div>'
      }, {
        lng: 120.009967,
        lat: 30.283928,
        title: '<div>杭州恒生科技园校区</div>',
        content: '<div>电话：0571-86103787</div><div>地址：余杭区文一西路1218号恒生科技园3期39号楼3楼 </div>'
      }, {
        lng: 120.257515,
        lat: 30.18772,
        title: '<div>杭州星光天地校区</div>',
        content: '<div>电话：0571-82570526</div><div>地址：萧山区金城路星光天地B座3楼</div>'
      }, {
        lng: 120.100941,
        lat: 30.286517,
        title: '<div>杭州西城广场校区</div>',
        content: '<div>电话： 0571-87396364</div><div>地址：西湖区文二西路西城广场2楼A06a号</div>'
      }],
      sx: [{
        lng: 120.497382,
        lat: 30.092242,
        title: '<div>绍兴柯桥校区</div>',
        content: '<div>电话：0575-89111668</div><div>地址：绍兴市柯桥蓝天市心广场7憧（沃尔玛二楼）</div>'
      }, {
        lng: 120.584229,
        lat: 29.992502,
        title: '<div>绍兴金帝银泰城校区</div>',
        content: '<div>电话：0575-89119911</div><div>地址：绍兴市金帝银泰城惠坊街7幢201号 </div>'
      }],
      nb: [{
        lng: 121.555283,
        lat: 29.877683,
        title: '<div>宁波鼓楼校区</div>',
        content: '<div>电话：0574-87398218</div><div>地址：宁波市海曙区世纪广场3楼</div>'
      }, {
        lng: 121.573938,
        lat: 29.873195,
        title: '<div>宁波江东校区</div>',
        content: '<div>电话：0574-88251665</div><div>地址：宁波市鄞州区箕漕街64号 </div>'
      }],
      wz: [{
        lng: 120.682406,
        lat: 27.997259,
        title: '<div>温州南浦校区</div>',
        content: '<div>电话：0577-88893861</div><div>地址：温州市南浦路南浦大厦1楼 </div>'
      }, {
        lng: 120.676495,
        lat: 28.02448,
        title: '<div>温州欧洲城校区</div>',
        content: '<div>电话： 0577-88988375</div><div>地址：温州市欧洲城2、3幢2楼 </div>'
      }, {
        lng: 120.723258,
        lat: 27.99389,
        title: '<div>温州汤家桥校区</div>',
        content: '<div>电话：0577-88890035</div><div>地址：温州市楠溪江路211号（家景花园东门） </div>'
      }],
      jh: [{
        lng: 119.674316,
        lat: 29.080228,
        title: '<div> 金华开隆商厦校区</div>',
        content: '<div>电话：0579 - 82889195</div><div>地址：金华市婺城区东阳街825号开隆商厦南门入口 </div>'
      }]
    }


    // 百度地图API功能
    var map = new BMap.Map("map");
    map.centerAndZoom("杭州", 13);
    map.enableScrollWheelZoom();
    map.enableContinuousZoom();
    map.addControl(new BMap.NavigationControl());
    map.addControl(new BMap.OverviewMapControl({
      isOpen: true,
      anchor: BMAP_ANCHOR_BOTTOM_RIGHT
    }));
    // 添加点
    function addMarker(point, title, content) {
      var marker = new BMap.Marker(point);
      map.addOverlay(marker);
      addClickHandler(title, content, marker);
    }

    function addClickHandler(title, content, marker) {
      marker.addEventListener("click", function(e) {
        var p = e.target;
        var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
        opts.title = title;
        var infoWindow = new BMap.InfoWindow(content, opts); // 创建信息窗口对象 
        map.openInfoWindow(infoWindow, point); //开启信息窗口
      });
    }


    $(function() {

      $('.marker').on('click', function() {
        $('.marker-dialog').hide();
        $(this).parent().find('.marker-dialog').show();
      })

      $('.close').on('click', function() {
        $('.marker-dialog').hide();
      });

      $('.city').on('click', function() {
        $('.box-map').hide();
        $('.map-box').show();
        var cityName = $(this).text();
        var cityCode = $(this).data('code');

        if (cityName === '上海') {
          $('#mapCity').text(cityName + '总部');
        } else {
          $('#mapCity').text(cityName + '分部');
        }
        map.centerAndZoom(cityName, 13);
        var posi = o[cityCode];
        for (var i = 0; i < posi.length; i++) {
          var point = new BMap.Point(posi[i].lng, posi[i].lat);
          addMarker(point, posi[i].title, posi[i].content);
        }
      })

      $('#back').on('click', function() {
        $('.box-map').show();
        $('.map-box').hide();
      })
    })
  </script>
</body>
</html>​